package FourArithmeticOperations;

import junit.framework.TestCase;

import java.util.LinkedList;

/**
 * Created by dell on 2017/9/25.
 */
public class LinkedTest extends TestCase {
    LinkedList list= new LinkedList();
    public void testRemoveFirst() throws Exception {
        list.add("hello");
        list.add("world");
        list.removeFirst();
        assertEquals(list.removeFirst().equals("world"),true);

    }

    public void testAddFirst() throws Exception {
        list.add("hello");
        assertEquals(list.isEmpty(),false);
    }

    public void testContains() throws Exception {
        list.add("hello");
        list.add("world");
        list.add("cai");
        assertEquals(list.contains("cai"),true);
    }

}